<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 第一遍 -->
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <!-- 
        ...  运算符 将数组转为【参数序列】
     -->
    <script>
        const BANZHANG = ["1", "2"];
        console.log(...BANZHANG);
        //  应用场景
        const A = ["1", "2"];
        const B = ["3", "4"];
        let c = [...A, ...B];
        console.log(c);
        // 深拷贝
        const D = [...A];
        D[0] = "5";
        console.log(A);
        console.log(D);
        // 将DOM的伪数组变成真正意义上的数组
        let divs = document.getElementsByClassName("div");
        console.log(divs);
        const divArr = [...divs];
        console.log(divArr);
    </script>


<!-- 第二遍 -->
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <!-- 
        ...  运算符 将数组转为【参数序列】
     -->
    <script>
        const BANZHANG = ["1", "2"];
        console.log(...BANZHANG);
        //  应用场景
        const A = ["1", "2"];
        const B = ["3", "4"];
        let c = [...A, ...B];
        console.log(c);
        // 深拷贝
        const D = [...A];
        D[0] = "5";
        console.log(A);
        console.log(D);
        // 将DOM的伪数组变成真正意义上的数组
        let divs = document.getElementsByClassName("div");
        console.log(divs);
        const divArr = [...divs];
        console.log(divArr);
    </script>


<!-- 第三遍 -->
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <!-- 
        ...  运算符 将数组转为【参数序列】
     -->
    <script>
        const BANZHANG = ["1", "2"];
        console.log(...BANZHANG);
        //  应用场景
        const A = ["1", "2"];
        const B = ["3", "4"];
        let c = [...A, ...B];
        console.log(c);
        // 深拷贝
        const D = [...A];
        D[0] = "5";
        console.log(A);
        console.log(D);
        // 将DOM的伪数组变成真正意义上的数组
        let divs = document.getElementsByClassName("div");
        console.log(divs);
        const divArr = [...divs];
        console.log(divArr);
    </script>
</body>

</html>